//导出路由配置表
export default [
    {
      path: '/index',
      name: 'index',
      component: () => import('../views/index/index.vue'),
      children:[
        {
          path: '/index/home',
          name: 'home',
          meta:{ title:'首页' },
          component: () => import('../views/index/home/home.vue'),
        },
        {
          path: '/index/admin',
          name: 'admin',
          meta:{ title:'管理员列表' },
          component: () => import('../views/index/admin/admin.vue'),
        },
        {
          path: '/index/swiper',
          name: 'swiper',
          meta:{ title:'轮播图列表' },
          component: () => import('../views/index/swiper/swiper.vue'),
        },
        {
          path: '/index/swiperadd',
          name: 'swiperadd',
          meta:{ title:'添加轮播图' },
          component: () => import('../views/index/swiperadd/swiperadd.vue'),
        },
        {
          path: '/index/pro',
          name: 'pro',
          meta:{ title:'产品列表' },
          component: () => import('../views/index/pro/pro.vue'),
        },
        {
          path: '/index/seckill',
          name: 'seckill',
          meta:{ title:'秒杀列表' },
          component: () => import('../views/index/seckill/seckill.vue'),
        },
        {
          path: '/index/recommend',
          name: 'recommend',
          meta:{ title:'推荐列表' },
          component: () => import('../views/index/recommend/recommend.vue'),
        },
        {
          path: '/index/filter',
          name: 'filter',
          meta:{ title:'筛选列表' },
          component: () => import('../views/index/filter/filter.vue'),
        },
        {
          path: '/index/echarts',
          name: 'echarts',
          meta:{ title:'echarts使用' },
          component: () => import('../views/index/echarts/echarts.vue'),
        },
        {
          path: '/index/edit',
          name: 'edit',
          meta:{ title:'编辑器使用' },
          component: () => import('../views/index/edit/edit.vue'),
        },
        {
          path: '/index/excel',
          name: 'excel',
          meta:{ title:'excel使用' },
          component: () => import('../views/index/excel/excel.vue'),
        },
        {
          path: '/index/map',
          name: 'map',
          meta:{ title:'百度地图' },
          component: () => import('../views/index/map/map.vue'),
        },
        {
          path: '/index',
          redirect:'/index/home'//嵌套路由的重定向
        }
      ]
    },
    {
      path: '/login',
      name: 'login',
      meta:{ title:'登陆' },
      component: () => import('../views/login/login.vue')
    },
    {
      path: '/',
      redirect: '/index',//一级路由的重定向
    }
  ]